# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年02月23日
"""

import docx
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from docx.shared import Pt

# -*- coding:utf-8 -*-
"""
Author：Administrator
Date:2023年02月23日
"""

import docx
from docx.enum.text import WD_PARAGRAPH_ALIGNMENT
from docx.shared import Pt

myDocument = docx.Document('打折商品.docx')

myDocument.sections[1].footer.is_linked_to_previous=False
myPragraph1=myDocument.sections[1].footer.paragraphs[0]
myPragraph1.text='这是第1节的页脚'
myPragraph1.alignment=WD_PARAGRAPH_ALIGNMENT.CENTER
myPragraph1.runs[0].font.size=Pt(16)

myDocument.sections[2].footer.is_linked_to_previous=False
myPragraph1=myDocument.sections[2].footer.paragraphs[0]
myPragraph1.text='这是第2节的页脚'
myPragraph1.alignment=WD_PARAGRAPH_ALIGNMENT.CENTER
myPragraph1.runs[0].font.size=Pt(16)

myDocument.sections[3].footer.is_linked_to_previous=False
myPragraph1=myDocument.sections[3].footer.paragraphs[0]
myPragraph1.text='这是第3节的页脚'
myPragraph1.alignment=WD_PARAGRAPH_ALIGNMENT.CENTER
myPragraph1.runs[0].font.size=Pt(16)


myDocument.save("02散文名篇.docx")

